package com.fsl.springbootatomikos;

import com.atomikos.util.ClassLoadingHelper;
import com.fsl.springbootatomikos.base.datasource.Databases1Config;
import com.fsl.springbootatomikos.base.datasource.Databases2Config;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;

@SpringBootApplication
@EnableConfigurationProperties(value = { Databases1Config.class,Databases2Config.class })
public class SpringbootAtomikosApplication {

	public static void main(String[] args) {
		System.setProperty("com.atomikos.icatch.file", ClassLoadingHelper.loadResourceFromClasspath(SpringbootAtomikosApplication.class, "transactions.properties").getPath());
		SpringApplication.run(SpringbootAtomikosApplication.class, args);
	}

}
